package handler

import (
	"github.com/gin-gonic/gin"
	"github.com/lab-online/internal/report/domain"
	"github.com/lab-online/internal/report/interface/rest"
)

type Handler struct {
	domain domain.ReportDomain
}

func New(domain domain.ReportDomain) rest.ReportHandler {
	return &Handler{domain}
}

func (*Handler) RemoveReport(c *gin.Context) {
	panic("not implemented")
}
func (*Handler) UpdateReport(c *gin.Context) {
	panic("not implemented")
}
func (*Handler) UpdateScore(c *gin.Context) {}

type reportInfo struct {
	ID           uint    `json:"id" binding:"required"`           // 报告ID
	ExperimentID uint    `json:"experimentID" binding:"required"` // 实验ID
	ClassID      uint    `json:"classID" binding:"required"`      // 班级ID
	Student      string  `json:"student" binding:"required"`      // 学生学号
	Score        float32 `json:"score" binding:"required"`        // 分数
	Status       uint    `json:"status" binding:"required"`       // 状态
}

type reportInfoWithContent struct {
	reportInfo
	Content string `json:"content" binding:"required"` // 报告内容
}
